<template>
    <div class="comment-cell">
        <!-- 评论列表 -->
        <div class="comment" style="margin-top: 30px; border-bottom: 1px solid gainsboro; padding: 15px 0;">
            <van-row>
                <van-col span="12">
                    <van-row>
                        <van-col span="4" class="headericon">
                            <img :src="`http://39.108.211.154${this.headerIcon}`" alt="">
                        </van-col>
                        <span class="username">{{item.det_uname}}</span>
                    </van-row>
                </van-col>
                <!-- <van-col span="12" class="num">
                    <span style="position: absolute;">{{item.clike}}
                        <img class="loveimg" src="/testimg/love0.png" style="" alt="">
                    </span>
                </van-col> -->
            </van-row>
            <p style="margin-bottom: 1em;margin-top: 1em;">{{item.ctext}}</p>
            <van-row>
                <van-col span="24" class="delete" style="display: flex; justify-content: space-between;">
                    <span class="hours" style="font-size: 12px;">{{moment(item.cdate).format('YYYY年MM月DD日')}}
                        <!-- <a href="#" style="margin-left: 2em;color: black;">回复</a> -->
                    </span>
                    <!-- <a href="#" style="font-size: 12px; color: black;">举报</a> -->
                </van-col>
            </van-row>
        </div>
    </div>
</template>

<script>
export default {
    props: ['item'],
    data() {
        return {
            Name: [],
            headerIcon:[],
        }
    },
    mounted(){
        this.Name=this.item.det_uname
        let headerUrl=`http://39.108.211.154:8080/user_uname?uname=${this.Name}`  //通过昵称获取此用户全部信息
        this.axios.get(headerUrl).then(res=>{
            // console.log('评论用户信息',res);
            this.headerIcon=res.data[0].uimg
        })
    },
}
</script>

<style lang="scss" scoped>
.headericon>img {
    width: 7vw;
    height: 7vw;
    border-radius: 50px;
}

.comment {
    position: static;


    .username {
        vertical-align: top;
        font-size: 15px;
    }

    .loveimg {
        width: 7vw;
        vertical-align: middle;
        right: 12px;
    }

    .num {
        display: flex;
        justify-content: end;
    }

    .comment-text {
        display: -moz-inline-box;
        width: 88vw;
    }

    .comment {
        display: flex;
        justify-content: end;

    }
}
</style>